package com.apptech.simplemediaplayerdemo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;

public class MainActivity extends Activity {

	ImageButton playButton, pauseButton;
	Intent in;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	playButton=(ImageButton)findViewById(R.id.play);
	pauseButton=(ImageButton)findViewById(R.id.pause);
		
System.out.println("+++++++++++++ID"+playButton.getId());
System.out.println("Hello");
	}

	public void show(View v) {
		System.out.println("View :"+v.getId());
		switch (v.getId()) {
		
		case R.id.play:

			in = new Intent(MainActivity.this, MyService.class);
			startService(in);

			break;
		case R.id.pause:
			in = new Intent(MainActivity.this, MyService.class);
			stopService(in);

			break;
		default:
			break;
		}
	}

}
